<table id='tables'>
  <tr>
  <th>Chọn<?php echo $form->input('checkallxoa',array('id'=>'checkallxoa','label'=>false,'type'=>'checkbox'));?></th>
    <th>STT</th>
    <th>Mã số</th>
    <th>Họ tên</th>
    <th>Chức vụ</th>
    <th>Chi đoàn</th>
  </tr>

<?php if(!empty($doanviens)){?>
<?php $i=1;?>
<?php foreach ($doanviens as $doanvien):?>
<tr>
<td><?php echo $form->input('',array('class'=>'checkxoa','name'=>'data[Phanquyen][doanvien]['.($loaidv==0?$doanvien['Sinhvien']['mssv']:$doanvien['Canbo']['mscb']).']','label'=>false,'type'=>'checkbox'));?></td>
<td><?php echo $i;?></td>
<td><?php echo ($loaidv==0?$doanvien['Sinhvien']['mssv']:$doanvien['Canbo']['mscb']);?></td>
<td><?php echo ($loaidv==0?$doanvien['Sinhvien']['hoten']:$doanvien['Canbo']['hoten']);?></td>
<td><?php echo $chucvus[$loaidv==0?$doanvien['Sinhvien']['mssv']:$doanvien['Canbo']['mscb']];?></td>
<td><?php echo $doanvien['Chidoansv']['tenchidoan'];?></td>
</tr>
<?php $i+=1;?>
<?php endforeach;?>
<?php }?>
</table>